import request from '../utils/request'

/**
 * 获取车辆列表
 */
export function busDistributionList(params) {
  return request({
    url: '/api/busDistributionList',
    method: 'post',
    data: {...params}
  })
}

/**
 * 创建车辆
 */
export function store(form) {
  return request({
    url: '/api/busDistribution',
    method: 'post',
    data: {...form}
  })
}

/**
 * 获取车辆详细数据以修改
 */
export function edit(id) {
  return request({
    url: `/api/busDistribution/${id}`,
    method: 'get',
    data: {id}
  })
}

/**
 * 修改车辆
 */
export function update(form, id) {
  return request({
    url: `/api/busDistribution/${id}`,
    method: 'put',
    data: {...form, id}
  })
}

/**
 * 删除车辆
 */
export function destroy(ids) {
  return request({
    url: '/api/busDistribution',
    method: 'delete',
    data: {ids}
  })
}

/**
 * 获取车队类型数组
 */
 export function getTeamlist() {
  return request({
    url: '/api/busDistribution/getTeamlist',
    method: 'post'    
  })
}
/**
 * 获取所有线路数组
 */
 export function getLines() {
  return request({
    url: '/api/getLines',
    method: 'post'    
  })
}
